<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let msg3 = 'hello world'
        // function fn (){
        //     console.log(msg3) //无法在初始化前使用msg3
        //     let msg3 = '你好，世界'
        // }
        // fn()

        // console.log(msg2)
        // let msg2 = '大聪明'

        // const [a,b,c] = ['ya','xi','la','lei']
        // console.log(c)

        let x = 1;
        let y = 2;
        // let k = x;
        // x = y
        // y = k
        // console.log(x,y)

        [x, y] = [y, x]
        console.log(x, y)
     
    </script>
</body>
</html>